package com.wujing.program

object Demo7 {

  def product(str: String) = {
    if (str.length==1){
      println(str.charAt(0).toLong)
    }else{
      println(str.take(1).charAt(0).toLong)
    }
  }

  def main(args: Array[String]): Unit = {
    product("hello")
  }

}
